package com.sino.operation.service.business;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.sino.operation.entity.BizExchangeInfo;
import com.sino.operation.entity.BizInternalTrans;

import java.util.Map;

public class Exec_710304_Util {

    //将中心录入字段进行登记薄归集
    public static BizInternalTrans CollectionHandle(Map<String, Map> date, BizInternalTrans bizInternalTrans) {

        return bizInternalTrans;
    }

    //判重
    public static QueryWrapper<BizInternalTrans> repeatJudge(BizInternalTrans bizExchangeInfo) {
        QueryWrapper<BizInternalTrans> wrapper = new QueryWrapper<>();
        wrapper.eq("CERDATE", bizExchangeInfo.getTranDate() == null ? "" : bizExchangeInfo.getTranDate());
        wrapper.eq("AMOUNT", bizExchangeInfo.getAmount() == null ? "" : bizExchangeInfo.getAmount());
        wrapper.eq("PAY_ACC", bizExchangeInfo.getPayAcc() == null ? "" : bizExchangeInfo.getPayAcc());
        wrapper.eq("RECV_BNO", bizExchangeInfo.getRecvAccno() == null ? "" : bizExchangeInfo.getRecvAccno());
        wrapper.eq("TRANS_CODE", bizExchangeInfo.getTransCode() == null ? "" : bizExchangeInfo.getTransCode());
//        wrapper.eq("RECV_ACC", bizExchangeInfo.getRecvAcc() == null ? "" : bizExchangeInfo.getRecvAcc());
        wrapper.eq("CERNO", bizExchangeInfo.getCerno() == null ? "" : bizExchangeInfo.getCerno());
        wrapper.ne("JOURNAL_NO", bizExchangeInfo.getJournalNo());
        return wrapper;
    }
}
